﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MathLib.Algebra;

namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnCalculate_Click(object sender, EventArgs e)
        {
            Monomial m1 = Monomial.Parse(txtValue1.Text.Trim());
            Monomial m2 = Monomial.Parse(txtValue2.Text.Trim());

            switch (cmbOperation.Text)
            {
                case "+": subSupLbl.Text = m1 + m2; break;
                case "-": subSupLbl.Text = m1 - m2; break;
                case "*": subSupLbl.Text = m1 * m2; break;
                case "÷": subSupLbl.Text = m1 / m2; break;
                default: break;
            }

        }
    }
}